using System.Collections.Generic;

namespace Beeflys.Generator
{
    static class SystemType
    {
        public const string BOOLEAN_KEYWORD = "bool";
        public const string STRING_KEYWORD = "string";
        public const string CHAR_KEYWORD = "char";
        public const string INT8_KEYWORD = "sbyte";
        public const string UINT8_KEYWORD = "byte";
        public const string INT16_KEYWORD = "short";
        public const string UINT16_KEYWORD = "ushort";
        public const string INT32_KEYWORD = "int";
        public const string UINT32_KEYWORD = "uint";
        public const string INT64_KEYWORD = "long";
        public const string UINT64_KEYWORD = "ulong";
        public const string FLOAT32_KEYWORD = "float";
        public const string FLOAT64_KEYWORD = "double";


        public static readonly string BOOLEAN_TYPE = typeof(bool).FullName;
        public static readonly string STRING_TYPE = typeof(string).FullName;
        public static readonly string CHAR_TYPE = typeof(char).FullName;
        public static readonly string INT8_TYPE = typeof(sbyte).FullName;
        public static readonly string UINT8_TYPE = typeof(byte).FullName;
        public static readonly string INT16_TYPE = typeof(short).FullName;
        public static readonly string UINT16_TYPE = typeof(ushort).FullName;
        public static readonly string INT32_TYPE = typeof(int).FullName;
        public static readonly string UINT32_TYPE = typeof(uint).FullName;
        public static readonly string INT64_TYPE = typeof(long).FullName;
        public static readonly string UINT64_TYPE = typeof(ulong).FullName;
        public static readonly string FLOAT32_TYPE = typeof(float).FullName;
        public static readonly string FLOAT64_TYPE = typeof(double).FullName;
        
        public static readonly HashSet<string> keywords = new HashSet<string>()
        {
            BOOLEAN_KEYWORD,
            STRING_KEYWORD, CHAR_KEYWORD,
            INT8_KEYWORD, UINT8_KEYWORD,
            INT16_KEYWORD, UINT16_KEYWORD,
            INT32_KEYWORD, UINT32_KEYWORD,
            INT64_KEYWORD, UINT64_KEYWORD,
            FLOAT32_KEYWORD, FLOAT64_KEYWORD
        };

        public static readonly HashSet<string> baseTypes = new HashSet<string>()
        {
            BOOLEAN_TYPE,
            STRING_TYPE, CHAR_TYPE,
            INT8_TYPE, UINT8_TYPE,
            INT16_TYPE, UINT16_TYPE,
            INT32_TYPE, UINT32_TYPE,
            INT64_TYPE, UINT64_TYPE,
            FLOAT32_TYPE, FLOAT64_TYPE
        };

        public static readonly Dictionary<string, string> defaultTypeMap = new Dictionary<string, string>()
        {
            { BOOLEAN_KEYWORD,   BOOLEAN_TYPE },
            { STRING_KEYWORD,    STRING_TYPE },
            { CHAR_KEYWORD,      CHAR_TYPE },
             
            { INT8_KEYWORD,    INT8_TYPE },
            { UINT8_KEYWORD,   UINT8_TYPE },
            { INT16_KEYWORD,   INT16_TYPE },
            { UINT16_KEYWORD,  UINT16_TYPE },
            { INT32_KEYWORD,   INT32_TYPE },
            { UINT32_KEYWORD,  UINT32_TYPE },
            { INT64_KEYWORD,   INT64_TYPE },
            { UINT64_KEYWORD,  UINT64_TYPE },
            { FLOAT32_KEYWORD, FLOAT32_TYPE },
            { FLOAT64_KEYWORD, FLOAT64_TYPE },
        };

     
    }
}